package org.softmed.rest.config;

import java.util.ArrayList;
import java.util.List;

import org.softmed.rest.config.Handler;
import org.softmed.rest.config.HttpMethod;

public class Resource {
	Long id;

	boolean active = true;
	String targetUri;
	Handler handler;
	List<HttpMethod> httpMethods = new ArrayList<HttpMethod>();

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public String getTargetUri() {
		return targetUri;
	}

	public void setTargetUri(String targetUri) {
		this.targetUri = targetUri;
	}

	public Handler getHandler() {
		return handler;
	}

	public void setHandler(Handler handler) {
		this.handler = handler;
	}

	public List<HttpMethod> getHttpMethods() {
		return httpMethods;
	}

	public void setHttpMethods(List<HttpMethod> httpMethods) {
		this.httpMethods = httpMethods;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	private Object readResolve() {
		httpMethods = new ArrayList<HttpMethod>();
		return this;
	}

}
